import time

import akshare as ak

# 指数估值 历史数据 韭圈儿
# https://funddb.cn/site/index
name = '沪深300'
indicator = '市盈率'
df = ak.index_value_hist_funddb(symbol=name, indicator=indicator)
date = time.strftime('%Y%m%d', time.localtime(time.time()))
# df.to_excel(f'{name}-{indicator}-历史数据-{date}.xlsx', index=False)
print(df)
